<div id="post_container">
    <div id="post_draft_wrapper">
        <p id="message"><?php echo $error.$success; ?></p>
        <table id="draft_table">
            <th id="draft_title">
                <span id="draft_title_text">Title</span>
                <span id="sort_container">
                    <?php echo '<a id="arrow_up" href="'.site_url().'post/sort_draft/'.$this->uri->segment(3).'/title/ASC">▲</a><br/>';?>
                    <?php echo '<a id="arrow_down" href="'.site_url().'post/sort_draft/'.$this->uri->segment(3).'/title/DESC">▼</a>';?>
                </span>
                <span class="balancer">
                </span>
            </th>
            <th id="draft_edit"></th>
            <th id="draft_publish"></th>
            <th id="draft_delete"></th>
            <?php foreach ($draft as $draft_item): ?>
            <tr>
                <td class="td_left"><?php echo $draft_item['title']; ?></td>
                <td class="td_center"><?php echo anchor('post/draft/edit/'.$draft_item['post_id'], 'Edit');?></td>
                <td class="td_center"><?php echo anchor('post/draft/publish/'.$draft_item['post_id'], 'Publish');?></td>
                <td class="td_center"><?php echo anchor('post/draft/delete/'.$draft_item['post_id'], 'Delete', array('onClick' => "return confirm('Are you sure you want to delete this draft?')"));?></td>
            </tr>
            <?php endforeach; ?>
        </table>
    </div>
</div>
